<div id="content">

    <?php
    $IdCombat = $_GET['IdCombat'];
    $IdCombattant = $_GET['IdCombattant'];
    $IdTypeResultat = $_GET['IdTypeResultat'];
    $oPDO = new PdoParticiper();

    $participer = $oPDO->readOne($IdCombattant, $IdCombat, $IdTypeResultat);

    include("./PDO/PdoCombattant.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Combattant.php"); //On inclut les fonctions PDO (create / update etc...)

    $sondage = new PdoCombattant();
    $sondage = $sondage->readAll();
    
    include("./PDO/PdoTypeResultat.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/TypeResultat.php"); //On inclut les fonctions PDO (create / update etc...)

    $typeresultat = new PdoTypeResultat();
    $typeresultat = $typeresultat->readAll();
    
    include("./PDO/PdoCombat.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Combat.php"); //On inclut les fonctions PDO (create / update etc...)

    $combat = new PdoCombat();
    $combat = $combat->readAll();

    echo "<form id='formulaire' action='index.php?route=participer&action=traitement_modif' method='post'>";

    echo "<label>Resultat</label>";
    echo "<input type='text' name='RESULTAT' value='" . $participer->getResultat() . "' />";

    echo "<label>Type Resultat</label>";
    echo '<select name="IDTYPERESULTAT" size="1">';
    foreach ($typeresultat as $untyperesultat) {
        echo '<option  value="' . $untyperesultat["IDTYPERESULTAT"] . '">' . $untyperesultat["LIBELLETYPERESULTAT"] . '</option>';
    }
    echo '</select>';
    
    echo "<label>Combat</label>";
    echo '<select name="IDCOMBAT" size="1">';
    foreach ($combat as $uncombat) {
        echo '<option  value="' . $uncombat["IDCOMBAT"] . '">' . $uncombat["TITRECOMBAT"] . '</option>';
    }
    echo '</select>';
    
    echo "<label>Combattant</label>";
    echo '<select name="IDCOMBATTANT" size="1">';
    foreach ($sondage as $uncombattant) {
        echo '<option  value="' . $uncombattant["IDCOMBATTANT"] . '">' . $uncombattant["NOMCOMBATTANT"] . '' . $uncombattant["PRENOMCOMBATTANT"] . '' . $uncombattant["SURNOMCOMBATTANT"] . '</option>';
    }
    echo '</select>' . "<br/>";
    echo "<input type='submit'  value='Valider'>";

    echo "</form>";

    ?>

</div>